package model

import "time"

func NewUploadDataRequest(scenicID string, notice string, totalTourists int, outTourists int, realtimeTourists int) *UploadDataRequest {
	now := time.Now().Unix()
	bookList := []struct {
		Label      string `json:"label"`
		StartTime  int64  `json:"start_time"`
		EndTime    int64  `json:"end_time"`
		Book_num   int    `json:"book_num"`
		Remain_num int    `json:"remain_num"`
	}{
		// 这里可以添加固定的时间段或者使用当前时间计算时间段
		{
			Label:      "08:00-09:00",
			StartTime:  now,        // 示例使用当前时间
			EndTime:    now + 3600, // 结束时间比开始时间晚1小时
			Book_num:   0,          // 根据实际情况设置
			Remain_num: 30,         // 根据实际情况设置
		},
		// 可以继续添加更多的时段
	}

	return &UploadDataRequest{
		Scenic_id:         scenicID,
		Scenic_status:     1,
		Notice:            notice,
		Total_tourists:    totalTourists,
		Out_tourists:      outTourists,
		Realtime_tourists: realtimeTourists,
		Request_time:      now,
		Book_list:         bookList,
	}
}
